#include <stdio.h>
#include <stdlib.h>

#define BUFFER_SIZE 256

char buff[BUFFER_SIZE];
char *string = buff;

int main()
{
    printf("Please input a string: ");
    // 使用 fgets 函数读取输入
    if (fgets(string, BUFFER_SIZE, stdin) != NULL) {
        // 去除 fgets 可能读取到的换行符
        size_t len = 0;
        while (string[len] != '\0') {
            if (string[len] == '\n') {
                string[len] = '\0';
                break;
            }
            len++;
        }
    }
    printf("\n Your string is: %s\n", string);
    return 0;
}

